n=int(input("输入一个整数,代表树干的高度:"))
k='$'
for i in range(n):
  x='*'*(2*i+1)
  print(x.center(2*n+1))
for j in range(n):
  print(k.center(2*n+1))
